printing 2d array elements using pointers